//
//  MYComposemenuBtn.swift
//  NewMicroblog
//
//  Created by apple on 2016/10/31.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit

class MYComposemenuBtn: UIButton {
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override var isHighlighted: Bool{
        get{
            return false
        }set{
            
        }
    }
    
    func setupUI(){
        imageView?.contentMode = .center
        titleLabel?.textAlignment = .center
        setTitleColor(UIColor.white, for: .normal)
        titleLabel?.font = UIFont.systemFont(ofSize: 14)
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        imageView?.width = self.width
        imageView?.height = self.width
        imageView?.y = 0
        titleLabel?.height = self.height - self.width
        titleLabel?.width = self.width
        titleLabel?.y = self.width
        titleLabel?.x = 0
        
    }
}
